home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_059
/
fixwb
/
poster
< prev
Wrap
Text File
|
1992-05-06
|
4KB
|
94 lines
Article 2650 of comp.sys.amiga:
Path: mcdsun!noao!hao!oddjob!uwvax!seismo!ll-xn!ames!lll-lcc!well!ewhac
From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Newsgroups: comp.sys.amiga
Subject: So Close, Yet So Far Away...
Message-ID: <2754@well.UUCP>
Date: 11 Mar 87 10:14:52 GMT
Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Distribution: world
Organization: Whole Earth Lectroinic Link, Sausalito, CA
Lines: 224
[ I've been released from the NSA mental health ward. ]
Hello again,
I had hoped that I might be able to give you all an actual utility.
As it turns out, I can't.
Once upon a time, I saw a program for the Macintrash computer that
loaded a picture into the Desktop's background, so that you would have a
pretty picture to look at behind all your windows instead of just a boring
pattern.
I thought I'd try writing this for the Amiga. It shouldn't be too
hard, I thought. Just change the WorkBench's backdrop window from
SIMPLE_REFRESH to SMART_REFRESH, without mashing anything.
Well, I got that far. But after modifying the backdrop window, I
discovered a "feature" of the WorkBench.
The disk icons are attached to the WorkBench backdrop window
(obviously), and are therefore rendered in its RastPort. I had anticipated
problems with this (disk icons might permanently mark a loaded image), but
didn't know exactly how WorkBench dealt with it.
I found out. Whenever you move a disk icon, or remove a volume from
a drive, the WorkBench program *clears the screen* and redraws all the disk
icons. Thus, if you render anything into the WorkBench window, it will get
erased the moment you fiddle with the disk icons.
This pretty much blew my idea out of the water. I can see no way
around this, apart from replacing the SetRast() call in the graphics library
(to check for to see if they're trying to clear the WorkBench and prevent
it), or by rewriting the WorkBench (no, thanks).
I also tried setting the RastPort's Mask value to 0. I thought this
would prevent any subsequent rendering into the window. It was here I
encountered what appears to be at first sight a bug in the graphics library.
After rendering into the window, I set the Mask to 0. Everything appeared
to be fixed on the screen. Then I moved my CLI window around. Everything
underneath it was erased. "Hmmm," I thought. "Could it be that, when
returning backup bitmaps to the visible screen, it's wrongly observing the
Mask value?" As an experiment, I changed the mask value to 1 and tried
moving the CLI window around again. After uncovering something, anything
that was in the masked bitplane disappeared. I can only assume that the
graphics library is trying to restore the visible bitmap while observing the
Mask value, which strikes me as wrong. Dale Luck, you out there? Can you
comment on this? (KS 1.2R, 512K CHIP, 2M FAST, 2 drives, MANX, written while
listening to 1812 Overture (Guru alerts take on a whole new meaning :-) ))
In any event, I did end up with some code that does, in fact, change
the WorkBench window from SIMPLE_ to SMART_REFRESH. I thought you people
might find it instuctive. And who knows; someone else may actually get my
original idea working.
The following program changes the identity of the WorkBench backdrop
window, then draws a couple of lines in it to "prove" that it's really SMART
now. You can move windows around, and the background will be preserved.
However, the moment you fiddle with the disk icons, the window will be
cleared, and the only thing you'll have to show for all this is a major loss
of chip RAM.
By the way, this is a MANX program.
cc fixwb.c
ln fixwb.o -lc -o fixwb
Maybe you people can do something constructive with this. Thanks
for your time and disk space.
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
________ ___ Leo L. Schwab
\ /___--__ The Guy in The Cape
___ ___ /\ ---##\ ihnp4!ptsfa!well!ewhac
/ X \_____ | __ _---)) ..or..
/ /_\-- -----+==____\ // \ _ well ---\
___ ( o---+------------------O/ \/ \ dual ----> !unicom!ewhac
\ / ___ \_ (`o ) hplabs -/ ("AE-wack")
____ \___/ \_/
Recumbent Bikes: "Work FOR? I don't work FOR
The _O_n_l_y Way To Fly! anybody! I'm just having fun."
_-_-_-_-_-_-_-_-_-_-_ Apply Andy Finkel here. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_